﻿using System;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows;
using System.Collections.Generic;

namespace MilitaryMeteo
{
    public class Angle
    {
        public double Value { get; set; }
        public double Radian { get { return Value * Math.PI / 30; } }

        public static Angle operator +(Angle a, Angle b)
        {
            return new Angle() { Value = a.Value + b.Value };
        }

        public static Angle operator -(Angle a, Angle b)
        {
            if ((a.Value - b.Value) > 0)
            {
                return new Angle() { Value = a.Value - b.Value };
            }
            return new Angle() { Value = 60 + (a.Value - b.Value) };
        }

        public static Angle operator -(Angle a, int b)
        {
            if ((a.Value - b) > 0)
            {
                return new Angle() { Value = a.Value - b };
            }
            return new Angle() { Value = 60 + (a.Value - b) };
        }
    }
}